package com.lft.freshordering.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lft.freshordering.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author tyhxzy
 * @since 2024-12-02
 */
public interface UserMapper extends BaseMapper<User> {
    @Select("select * from user where usname=#{usname}")
    User selectUserByName(String usname);

    //查询用户
    User selectUserById(Integer id);

    //修改个人信息
    int updateUser(User user);

    @Insert("insert into user(openid ) values (#{openid})")
    int insertUser(String openid);

    @Select("select * from user where openid=#{openid}")
    User selectUserByOpenid(String openid);
}
